Method and device for adding lyrics to short video

ABSTRACT

Methods and devices are provided for adding lyrics to a short video. The device obtains a music material required by the short video and obtains a first playback duration of the short video. The device obtains a target music material having a playback duration matching the first playback duration. The device obtains a lyric sticker corresponding to the target music material based on the lyrics extracted from the target music material and displays a processed short video after adding with the lyric sticker.

CROSS-REFERENCE TO RELATED APPLICATION[S]

This application is based on and claims priority to Chinese Patentapplication No. 202010887615.6, filed on Aug. 28, 2020, in the ChinaNational Intellectual Property Administration, the disclosure of whichis herein incorporated by reference in its entirety.

FIELD

The disclosure relates to a field of video processing technologies, andmore particularly to a method and a device for adding lyrics to a shortvideo, an apparatus, an electronic device, and a storage medium.

BACKGROUND

With rapid development of mobile terminal technologies, applicationsoftware with various functions has emerged, which can bring convenienceand entertainment to users. Through statistics of historical searchkeyword data, the search volume related to the keyword “add lyrics to ashort video” has been high. In other words, in recent years, the demandfor users to add the lyrics to the short video has become stronger andstronger.

SUMMARY

A method for adding lyrics to a short video is provided. According to anembodiment of the disclosure, method includes obtaining a music materialrequired by a short video; obtaining a first playback duration of theshort video; generating a target music material corresponding to theshort video based on the first playback duration, where a playbackduration of the target music material matches the first playbackduration; and generating a lyric sticker corresponding to the targetmusic material based on the lyrics extracted from the target musicmaterial and displaying the short video added with the lyric sticker.

An electronic device. According to an embodiment of the disclosure, theelectronic device includes a processor; and a memory configured to storeinstructions executable by the processor. The processor is configured toexecute the instructions to implement a method for adding lyrics to ashort video described above.

A non-transitory computer readable storage medium is provided. Accordingto an embodiment of the disclosure, when instructions in the storagemedium are executed by a processor of an electronic device, theelectronic device is configured to execute a method for adding lyrics toa short video described above.

It is to be understood that, the above general description and thefollowing detailed description are only exemplary and explanatory, anddo not limit the disclosure.

BRIEF DESCRIPTION OF THE DRAWINGS

The above information is presented as background information only toassist with an understanding of the disclosure. No determination hasbeen made, and no assertion is made, as to whether any of the abovemight be applicable as prior art with regard to the disclosure.

FIG. 1 is a flowchart illustrating a method for adding lyrics to a shortvideo according to embodiments of the disclosure.

FIG. 2 is a flowchart illustrating another method for adding lyrics to ashort video according to some embodiments of the disclosure.

FIG. 3 is a schematic diagram illustrating displayed colors of soundwaves in an audio display area according to embodiments of thedisclosure.

FIG. 4 is a schematic diagram illustrating a displaying manner of afirst reminder message according to embodiments of the disclosure.

FIG. 5 is a schematic diagram illustrating a playback progress of atarget music material according to embodiments of the disclosure.

FIG. 6 is a flowchart illustrating a method for adding lyrics to a shortvideo according to embodiments of the disclosure.

FIG. 7 is a schematic diagram illustrating a dynamic effect of soundwaves of the lyrics according to embodiments of the disclosure.

FIG. 8 is a flowchart illustrating a method for adding lyrics to a shortvideo according to embodiments of the disclosure.

FIG. 9 is a schematic diagram illustrating a display manner of a colortuning area according to embodiments of the disclosure.

FIG. 10 is a schematic diagram illustrating a floating window accordingto embodiments of the disclosure.

FIG. 11 is a flowchart illustrating a method for adding lyrics to ashort video according to embodiments of the disclosure.

FIG. 12 is a schematic diagram illustrating a display manner of a wordeffect area according to embodiments of the disclosure.

FIG. 13 is a schematic diagram illustrating a different word effectaccording to embodiments of the disclosure.

FIG. 14 is a flowchart illustrating a method for adding lyrics to ashort video according to embodiments of the disclosure.

FIG. 15 is a schematic diagram of adjusting a position of lyricsaccording to embodiments of the disclosure.

FIG. 16 is a schematic diagram of adjusting a font size of lyricsaccording to embodiments of the disclosure.

FIG. 17 is a flowchart illustrating a method for adding lyrics to ashort video according to embodiments of the disclosure.

FIG. 18 is a schematic diagram of removing lyrics according toembodiments of the disclosure.

FIG. 19 is a schematic diagram illustrating an entry control accordingto embodiments of the disclosure.

FIG. 20 is a flowchart illustrating a method for adding lyrics to ashort video according to embodiments of the disclosure.

FIG. 21 is a schematic diagram illustrating a first display pageaccording to embodiments of the disclosure.

FIG. 22 is a schematic diagram illustrating a music editing pageaccording to embodiments of the disclosure.

FIG. 23 is a schematic diagram illustrating a shooting page in a targetshort video according to embodiments of the disclosure.

FIG. 24 is a schematic diagram illustrating controls on a first displaypage according to embodiments of the disclosure.

FIG. 25 is a schematic diagram illustrating a favorites icon on a firstdisplay page according to embodiments of the disclosure.

FIG. 26 is a flowchart illustrating a method for adding lyrics to ashort video according to embodiments of the disclosure.

FIG. 27 is a schematic diagram illustrating a gradual process of addinglyrics to a short video according to embodiments of the disclosure.

FIG. 28 is a schematic diagram illustrating a layout of functional areasof a music editing page according to embodiments of the disclosure.

FIG. 29 is a flowchart illustrating a method for adding lyrics to ashort video according to embodiments of the disclosure.

FIG. 30 is a flowchart illustrating a method for adding lyrics to ashort video according to embodiments of the disclosure.

FIG. 31 is a schematic diagram illustrating a second display pageaccording to embodiments of the disclosure.

FIG. 32 is a schematic diagram illustrating a display manner of a secondreminding message according to embodiments of the disclosure.

FIG. 33 is a block diagram illustrating a device for adding lyrics to ashort video according to embodiments of the disclosure.

FIG. 34 is a block diagram illustrating a device for adding lyrics to ashort video according to embodiments of the disclosure.

FIG. 35 is a block diagram illustrating a device for adding lyrics to ashort video according to embodiments of the disclosure.

FIG. 36 is a block diagram illustrating a device for adding lyrics to ashort video according to embodiments of the disclosure.

FIG. 37 is a block diagram illustrating a device for adding lyrics to ashort video according to embodiments of the disclosure.

FIG. 38 is a block diagram illustrating a device for adding lyrics to ashort video according to embodiments of the disclosure.

FIG. 39 is a block diagram illustrating a device for adding lyrics to ashort video according to embodiments of the disclosure.

FIG. 10 is a block diagram illustrating a device for adding lyrics to ashort video according to embodiments of the disclosure.

FIG. 41 is a block diagram illustrating an electronic device accordingto embodiments of the disclosure.

DETAILED DESCRIPTION

In order to enable the skilled person in the art to well understandtechnical solutions of the disclosure, the technical solution accordingto embodiments of the disclosure will be described clearly andcompletely with reference to the accompanying drawings.

It should be noted that terms “first” and “second” in the specification,appended claims and the above-mentioned drawings are used to distinguishsimilar objects, and not necessarily used to describe a specificsequence or sequence. It is to be understood that features defined bythese terms can be interchanged in appropriate circumstances such thatembodiments of the disclosure described herein can be implemented in anorder other than those illustrated or described herein. Theimplementation manners described in following embodiments do notrepresent all implementation manners consistent with the disclosure,instead, they are only examples of devices and methods consistent withsome aspects of the disclosure as detailed in the appended claims.

FIG. 1 is a flowchart illustrating a method for adding lyrics to a shortvideo according to embodiments of the disclosure. As illustrated in FIG.1, the method for adding lyrics to a short video includes the following.

At 101, a first playback duration of a short video is obtained.

It is to be noted that an execution subject of the method for addinglyrics to a short video according to the disclosure is a device foradding lyrics to a short video. The method for adding lyrics to a shortvideo according to embodiments of the disclosure can be executed by thedevice for adding lyrics to a short video according to embodiments ofthe disclosure. The device for adding lyrics to a short video may be ahardware device, or software in a hardware device. The hardware devicemay be a terminal device, a server, or the like.

In an example, the short video, i.e., short-form video, refers to avideo with a playback duration less than 5 minutes. In another example,the short video refers to a video album containing at least two photos.As still another example, the short video refers to a video collectioncontaining one or more videos and having a total playback duration lessthan 5 minutes. As yet another example, the short video refers to avideo file containing at least one photo and at least one video.

In embodiments of the disclosure, the short video can be acquired. Theplayback duration of the short video can be acquired as the firstplayback duration after the short video is acquired.

It is to be noted that for obtaining the short video, a pre-stored videoin a local storage area or a remote storage area can be acquired, or avideo can be directly recorded. In some examples, the stored video canbe retrieved from a local video library, a remote video library, animage library, both the local video library and the remote videolibrary, both the local video library and the image library, both theremote video library and the image library, and all of the local videolibrary, the remote video library and the image library. In someexamples, the video can be directly recorded. The way of obtaining theshort video is not limited in embodiments of the disclosure, and the waycan be selected based on actual situations.

It is to be noted that after the video is obtained in theabove-mentioned ways, it can be determined whether the obtained videomeets a processing condition. When it is identified that the duration ofthe video is less than or equal to a preset duration, it indicates thatthe acquired video meets the processing condition, and the acquiredvideo can be regarded as the short video. When it is identified that theduration of the video is greater than the preset duration, it indicatesthat the acquired video does not meet the processing condition, theacquired video can be cut to obtain a video clip such that the durationof the video clip is less than or equal to the preset duration, and thevideo clip is used as the short video. The preset duration can be setbased on actual conditions. For example, the preset duration can be setto 5 minutes or 60 seconds.

Further, when it is identified that the duration of the video is lessthan or equal to the preset duration, the duration of the video is usedas the first playback duration. When it is identified that the durationof the video is greater than the preset duration, the preset duration isthe first playback duration of the short video which is the video clipsubjected to the video cutting.

At 102, a target music material corresponding to the short video isgenerated based on the first playback duration, where a playbackduration of the target music material matches the first playbackduration.

In some examples, the target music material is generated from a musicmaterial required by the short video. The music material required can bea sound effect. For example, the music material can be a sound materialabout animals and natural world, a background sound effect, and a songsegment.

In some examples, for obtaining the music material required by the shortvideo, an obtaining instruction can be automatically generated, anddelivered audio and lyrics of the music material can be received.

It is to be noted that for obtaining the music material required by theshort video, the music material pre-stored in a local storage area or aremote storage area can be obtained, or the music material can berecorded directly. As an example, the stored music material can beretrieved from at least one of a local audio library or a remote audiolibrary as the music material required by the short video. As anotherexample, the music material required by the short video can be directlyrecorded. The manner of obtaining the music material required by theshort video is not limited in embodiments of the disclosure, which canbe selected according to actual situations.

In an example, the target music material may be a music material whoseplayback duration is the same with the first playback duration. Inanother example, the target music material may be a music materialcontaining a music material whose playback duration is shorter than thefirst playback duration and a part of audio of the music material. Asstill another example, the target music material can be a part of audioof a music material whose playback duration is longer than the firstplayback duration.

At 103, a lyric sticker corresponding to the target music material isgenerated based on lyrics extracted from the target music material andthe short video added with the lyric sticker is displayed.

In some examples, after the target music material is obtained, the usercan extract the lyrics from the target music material. The musicmaterial generally contains lyrics and audio, and the user can extractand edit the lyrics. For example, word effect and color of the lyrics,or length of the audio can be edited to generate the lyric stickercorresponding to the target music material.

Further, a playback timeline of the lyric sticker can be generated froma playback time of the target music material. The playback timeline ofthe lyric sticker is synchronized with the playback timeline of theshort video. Lyrics to be displayed by the lyric sticker aresynchronously updated based on a current playback progress of the shortvideo.

It is to be noted that, to display an edited lyric sticker in the shortvideo, relevant data of the target music material, i.e., image framesand playback times of the audio, are also synchronized whilesimultaneously updating the lyrics displayed by the lyric sticker basedon the current playback progress of the short video, such that theedited target music material can be displayed synchronously with theshort video.

In the disclosure, the interaction solution is simplified.

After the music material required by the short video and the firstplayback duration of the short video are obtained, a matched targetmusic material is generated based on the first playback duration, acorresponding lyric sticker is generated based on the extracted lyrics,and the lyric sticker is added to the short video such that the lyricsticker can be displayed dynamically in the short video depending on thetarget music material.

In some examples, the number of interactions is reduced, the operationtime is shortened, the learning cost is saved, and the user experienceis improved.

It is to be noted that, in the disclosure, for generating the targetmusic material whose playback duration matches the duration of the shortvideo, a second playback duration of the music material is obtained, andthe target music material is obtained by editing the music materialbased on the first playback duration and the second playback duration.

As a possible implementation, as illustrated in FIG. 2, on the basis ofthe foregoing embodiments, generating the target music materialcorresponding to the short video based on the first playback duration at103 includes the following.

At 201, a music material is obtained and a second playback duration ofthe music material is acquired.

In embodiments of the disclosure, after the music material required isobtained, the playback duration of the music material can be obtained asthe second playback duration.

The second playback duration of the music material can be acquired. Unitof the first playback duration is consistent with the unit of the secondplayback duration. As an example, the first playback duration is 150seconds, and the second playback duration is 125 seconds. As anotherexample, the first playback duration is 1.5 minutes, and the secondplayback duration is 1.2 minutes.

At 202, it is determined whether the first playback duration is greaterthan the second playback duration.

In some examples, when it is identified that the first playback durationis greater than the second playback duration, that is, the playbackduration of the short video is longer than the playback duration of themusic material required, 203 can be performed. When it is identifiedthat the first playback duration is less than the second playbackduration, that is, the playback duration of the short video is shorterthan the playback duration of the music material required, 204 can beperformed. When it is identified that the first playback duration isequal to the second playback duration, that is, the playback duration ofthe short video is the same with the playback duration of the musicmaterial required and the music material required can be directlydetermined as the target music material without being edited.

At 203, when the first playback duration is greater than the secondplayback duration, the playback duration of the music material iscompensated to the first playback duration to generate the target musicmaterial.

In some examples, when the first playback duration is greater than thesecond playback duration, a duration difference between the firstplayback duration and the second playback duration may be obtained, andthe music material is played in a loop based on the duration differenceto compensate the second playback duration to the first playbackduration.

For compensating the playback duration of the music material to thefirst playback duration, the compensation method can be selected basedon actual situations. The audio of the music material may be played in aloop until a sum of the second playback duration and a looped playbackduration is the same with the first playback duration. For example, theplayback duration of music material is 2 minutes, while the playbackduration of short video is 3 minutes. In this case, the music materialneeds to be played in a loop, to extend the playback duration of themusic material to 3 minutes.

At 204, when the first playback duration is less than the secondplayback duration, the music material is cut to generate the targetmusic material.

In some examples, when the first playback duration is less than thesecond playback duration, a cutting position may be determined for themusic material based on monitoring that there is a cutting operation forthe music material. Further, the music material is truncated at thecutting position to generate the target music material.

As a possible implementation, a music segment can be selected bydragging an audio bar in an audio display area. At this time, lyricscorresponding to the selected music segment can be displayed in a lyricdisplay area in synchronization. Within a box at a fixed position of theaudio display area, the audio bar can be dragged to slide leftwards orrightwards.

It is to be noted that, to enable the user to accurately observe thecutting process, different colors can be set for sound waves displayedin the audio bar. For example, as illustrated in FIG. 3, when a cutmusic material is played, the color of the audio bar within the box canbe displayed as orange 23-1. When an uncut music material is played, thecolor of the audio bar within the box is white 23-2.

In some embodiments of the disclosure, when it is identified that thefirst playback duration is greater than or equal to the second playbackduration, a first reminder message that the cutting operation fails canbe generated and displayed in the lyric display area to tell the user.

Language of the first reminder message can be selected based on actualsituations to meet different language habits and preferences of theuser. For example, the language can be set as Chinese or English.

For example, as illustrated in FIG. 4, after the cutting operationfails, the first reminder message “music is too short to cut lyrics” canbe generated and displayed in the lyric display area 24.

In some embodiments of the disclosure, to enable the user to accuratelyand intuitively observe the playback progress of the target musicmaterial, the playback progress of the target music material may bedisplayed. In some examples, the playback progress of the target musicmaterial may be determined and displayed in the audio display area basedon a current playback time and the first playback duration of the targetmusic material.

For example, as illustrated in FIG. 5(a), the current playback time ofthe target music material and the first playback duration of a sourceshort video are displayed in the audio display area, where 00:35 is thecurrent playback time of the target music material, and 04:15 is thefirst playback duration.

In some embodiments of the disclosure, after the first playback durationof the short video is obtained, a remaining playback duration of thesource short video can be determined and displayed in the audio displayarea based on the current playback time and the first playback durationof the target music material.

For example, as illustrated in FIG. 5(b), the current playback time ofthe target music material and the remaining playback duration of thesource short video are displayed in the audio display area, where 00:35is the current playback time of the target music material, and 03:40 isthe remaining playback duration of the source short video.

In the disclosure, a problem that the lyric sticker cannot bedynamically displayed in the short video with the target music materialdue to the mismatch between the playback duration of the target musicmaterial and the playback duration of the short video can be solved, andthe user experience is improved.

It is to be noted that the target music material generally contains anintro. As a result, the lyrics do not appear from the beginning to theend of the music material. For example, the total playback duration ofthe target music material is 3 minutes, and an appearance duration ofthe lyrics is 2 minutes, starting from the 30^(th) second to the 30^(th)second of the 2^(nd) minute. In some cases, the target music materialmay have no lyrics. For example, the target music material is absolutemusic, or sound materials about animals and natural world. In thedisclosure, for extracting the lyrics from the target music material, asegment without lyrics can be identified from the target music material.When it is identified that there is a segment without lyrics, acorresponding dynamic effect can be generated for the segment withoutlyrics. A technical problem of poor user experience due to the lack oflyrics display in the lyric display area when playing the segmentwithout lyrics can be solved.

As a possible implementation, as illustrated in FIG. 6, based on theforegoing embodiments, extracting the lyrics from the target musicmaterial in 104 can include the following.

At 301, a segment without lyrics is identified from the target musicmaterial, and a dynamic effect of sound waves corresponding to thesegment without lyrics is determined based on an amplitude of the audio.

In some examples, it can be determined whether the target music materialincludes the segment without lyrics.

The lyric is essentially a kind of voice information. Therefore, inembodiments of the disclosure, for determining whether the target musicmaterial includes the segment without lyrics, voice recognition oflyrics can be performed on the target music material to determinewhether the target music material includes the segment without lyrics.

Further, when it is identified that the target music material includesthe segment without lyrics, the dynamic effect of sound wavescorresponding to the segment without lyrics can be determined based onthe amplitude of the audio. When it is identified that the target musicmaterial does not include the segment without lyrics, the lyrics can bedirectly loaded and displayed in the lyric display area.

Since there are different amplitudes of the audio, to make the displayedsound waves vividly reflect the target music material, the dynamiceffect of sound waves can change to follow different amplitudes of theaudio.

At 302, the sound waves are displayed with the dynamic effect.

For example, as illustrated in FIG. 7, the target music material is apiece of absolute music with a duration of 30 seconds. That is, it isidentified that the target music material includes the segment withoutlyrics. In this case, the dynamic effect of the sound wavescorresponding to the segment without lyrics can be determined based onthe amplitude of the audio and the sound waves 25 are displayed with thedynamic effect.

It is to be noted that the lyrics and the sound waves cannot displayedsimultaneously in the short video. That is, when there is no lyricsdisplayed, the sound waves are displayed. When there is the lyricsappear, no sound waves are displayed.

With the method for adding lyrics to a short video according toembodiments of the disclosure, by identifying the segment without lyricsin the target music material, and determining the dynamic effect ofsound waves corresponding to the segment without lyrics based on theamplitude of the audio, the sound waves are displayed with the dynamiceffect. When there is a segment without lyrics in the target musicmaterial, instead of the lyric sticker, the sound waves can be displayedwith the dynamic effect in short video.

In some embodiments of the disclosure, black caused by the segmentwithout lyrics can be reduced.

In some embodiments of the disclosure, poor visual experience due to thelack of lyric sticker is relieved as much as possible, and the userexperience is improved.

In embodiments of the disclosure, the user can perform various editingoperations on the target music material on a music editing page, such ascolor tuning, cutting, and word effect modifying. Therefore, in thedisclosure, the target music material can be edited in response to anedition operation on the target music material on a music editing page.

The following explains the editing process of the target music materialbased on different editing requirements for different areas of the musicediting page.

Regarding a color tuning area, in a possible implementation of thedisclosure, editing the color of the lyrics in the target music materialin response to a color editing operation on the target music material onthe music editing page includes the following, as illustrated in FIG. 8.

At 401, a color editing operation on the lyrics is responded to.

At 402, a staying position of the color editing operation in a colortuning area is obtained.

In embodiments of the disclosure, the color tuning section is used todisplay candidate colors on the music editing interface. The colortuning area includes an outer frame and a filled area. The filled areaincludes multiple sub-areas. Each sub-area corresponds to a candidatecolor. The filled area is filled with color based on a correspondencebetween the sub-areas and the candidate colors.

The number of candidate colors in the color tuning area and the types ofcandidate colors can be set based on actual conditions. For example, thecandidate colors can be red, orange, yellow, green, dark green, black,blue, purple, white, pink, gray, and brown, i.e., there are totally 12candidate colors. In actual applications, a color can be preset asdefault. For example, the white color can be preset as the defaultcolor. In this case, when the target music material is loaded into themusic editing page and displayed in the lyric display area, the lyricscan be displayed as white.

A display manner of the color tuning area can be set based on actualsituations. As an example, the color tuning area can be a slider 21-1 asillustrated in FIG. 9(a). As another example, the color tuning area canbe a color plate as illustrated in FIG. 9(b).

In some embodiments, the color editing operation in the color tuningarea can be monitored. After it is monitored that there is a colorediting operation, the staying position of the color editing operationon the color tuning area can be obtained. The staying position is asub-area of the color tuning area.

At 403, the target color to be used for the lyrics of the target musicmaterial is obtained based on the staying position.

In some examples, after obtaining the staying position of the colorediting operation in the color tuning area, a candidate colorcorresponding to the sub-area can be determined based on the sub-areawhere the staying position is located. The candidate color is determinedas the target color used for the lyrics of the target music material.

At 404, a color of the lyrics is edited to the target color.

In some examples, after the target color is obtained, codes of thetarget color can be overwritten to the codes of the color used currentlyfor the lyrics stored in the program to edit the color of the lyrics tothe target color.

The target color can be represented by the Red Green Blue Color Mode(RGB color mode for short). For example, when the RGB color mode is(255, 255, 0), it means that the target color is yellow.

For example, the staying position of the color editing operation in thecolor tuning area is obtained, and the target color to be used for thelyrics of the target music material is obtained as (255, 255, 0), i.e.,yellow, based on the staying position. The codes of the target color(255, 255, 0) can be overwritten to the codes of the default color (255,255, 255) currently used and stored in the program to edit the defaultwhite color to the yellow color for the lyrics.

In embodiments of the disclosure, the lyrics can be displayed withdifferent colors at different times.

In the disclosure, the user experience is improved, and the displayedcolor of the lyrics of the target music material is in line with userrequirements.

For example, a current playback time of the target music material can beobtained, and a current color of the lyrics is edited to the targetcolor starting from the current playback time to the ending of theplayback of the target music material.

As an example, the target color is yellow. When the obtained currentplayback time of the target music material is 15^(th) second of the2^(nd) minute, the current color of the lyrics can be edited to theyellow starting from the 15^(th) second of the 2^(nd) minute until theplayback of the target music material ends.

It is to be noted that for editing the color of the lyrics, the color ofthe lyrics can be edited multiple times during the playback duration ofthe audio. That is, multiple target colors can be set for the lyricsseparately at different playback times and a current target color isdifferent from the previous one. For example, the current playback timeof the target music material may be obtained, and the current color ofthe lyrics is edited to the target color starting from the currentplayback time to a playback time corresponding to a next target color orto the ending of the playback of the target music material.

As an example, when the target color is yellow, when the obtainedcurrent playback time of the target music material is the 15^(th) secondof the 2^(nd) minute, the current color of the lyrics can be edited tothe yellow color starting from the 15^(th) second of the 2^(nd) minute.Further, when obtaining the next target color, i.e., red, the currentplayback time of the target music material can be obtained again. It maybe determined that the current playback time corresponding to the redcolor is the 55^(th) second of the 2^(nd) minute, the color of thelyrics can be edited from the yellow to red starting from the 55^(th)second of the 2^(nd) minute to the playback time corresponding to thenext target color or until the playback of the target music materialends.

It is to be noted that users can perform various editing operations onthe target music material on the music editing page. However, in actualapplications, the area of the music editing page is limited, which makeswhen the editing operation stays on a certain position of the slider orthe color plate, the user cannot intuitively and accurately know thecurrently selected target color.

In the disclosure, a floating window can be used to display enlargedtarget color.

For example, the floating window carrying the target color can bedisplayed at the staying position, where the floating window is used todisplay the target color by enlarging the area of the target color. Asillustrated in FIG. 10, after the staying position of the color editingoperation on the color tuning area 21 is obtained, the floating window21-3 carrying the target color will be displayed at the staying positionto enlarge the area of the target color and display the enlarged targetcolor.

It is to be noted that a staying duration of the floating window can bethe same as a staying duration of the color editing operation on thecolor tuning area. That is, when it is identified that the color editingoperation stays on the color tuning area, the floating window isdisplayed. When it is identified that the color editing operation doesnot stay on the color tuning area, the floating window disappears.

For a word effect area, in a possible implementation of embodiments ofthe disclosure, editing the target music material in response to theediting operation on the target music material on the music editing pageincludes the following, as illustrated in FIG. 11.

At 501, in response to a word effect selection operation of the lyrics,a selected target word effect is determined based on a position of theword effect selection operation on the music editing page.

In embodiments of the disclosure, a variety of preset words effects canbe displayed in the word effect area. Types and the number of the wordeffects displayed in the word effect area can be set based on actualconditions.

For example, as illustrated in FIG. 12, five types of word effects canbe displayed, i.e., “typewriter, “invert duck”, “highlight”,“typesetting” and “single-line”. The word effect of “single-line” isillustrated as FIG. 13(a). The word effect of “invert duck” isillustrated in FIG. 13(b). The word effect of “highlight” is illustratedin FIG. 13(c). The word effect of “typesetting” is illustrated in FIG.13(d). The word effect of “typewriter” is illustrated in FIG. 13(e). Theword effect “single-line” is the default word effect.

For example, the word effect selection operation in the word effect areais monitored. The position of the word effect selection operation on thepage is obtained. A mapping relationship between preset positions andcandidate word effects is queried based on the position to determine theselected word effect and mark the selected word effect as the targetwork effect.

At 502, an effect of the lyrics is configured and displayed based on thetarget word effect.

In embodiments of the disclosure, different word effects can be set forthe lyrics at different times.

In the disclosure, the user experience is improved and the displayedword effect of the lyrics of the target music material is in line withuser requirements.

For example, a current playback time of the target music material can beobtained, and the effect of the lyrics can be configured based on thetarget word effect starting from the current playback time until theplayback of the target music material ends.

As an example, when the target word effect is the “typewriter” and theobtained current playback time of the target music material is the15^(th) second of the 2^(nd) minute, the current word effect of thelyrics is edited to the “typewriter” starting from the 15^(th) second ofthe 2^(nd) minute to the ending of the playback of the target musicmaterial.

It is to be noted that for editing the word effect of the lyrics, theword effect of the lyrics can be edited multiple times during theplayback duration of the audio. That is, multiple target effects can beset for the lyrics at different times, and a current target word effectis different from the previous target word effect. For example, thecurrent playback time of the target music material may be obtained. Thecurrent word effect of the lyrics is edited to the target word effectstarting from the current playback time to a playback time correspondingto the next target word effect or until the playback of the target musicmaterial ends.

For example, when the target word effect is the “typewriter” and theobtained current playback time of the target music material is the15^(th) second of the 2^(nd) minute, the current word effect of thelyrics is edited to the word effect of “typewriter” starting from the15^(th) second of the 2^(nd) minute. Further, when it is obtained thatthe next target word effect is the word effect of “typesetting”, thecurrent playback time of the target music material can be obtainedagain. It is determined that the current playback time is the 55 ^(th)second of the 2^(nd) minute. The word effect of “typewriter” of thelyrics can be edited to the word effect of “typesetting” starting fromthe 55 ^(th) second of the 2^(nd) minute to a playback timecorresponding to the next target word effect or until the playback ofthe target music material playback ends.

In embodiments of the disclosure, the position of the lyrics in thelyric display area can be adjusted.

In the disclosure, occlusion of the short video by the displayed lyricscan be obtained and the display position of the lyrics is in line withuser requirements,

In a possible implementation of embodiments of the disclosure, the abovemethod for adding lyrics to a short video can include the following, asillustrated in FIG. 14.

At 601, a position adjustment operation of the lyrics in the lyricdisplay area is monitored, and a target position of the lyrics isdetermined based on the position adjustment operation.

At 602, the lyrics are displayed after moving to the target position.

For example, after it is monitored that there is the position adjustmentoperation of the lyrics, the lyrics can be moved from the currentposition illustrated in FIG. 15(a) to the target position illustrated inFIG. 15(b) for display.

In some embodiments of the disclosure, the font size of the lyrics inthe lyric display area can be adjusted.

In the disclosure, the font size of the lyrics can match the content ofthe short video and user requirements can be met.

For example, a scaling operation of the lyrics in the lyric display areacan be monitored, and the font size of the lyrics can be enlarged orreduced based on the scaling operation.

As an example, after it is monitored that there is the scaling operationof the lyrics, the lyrics can be scaling from the current font sizeillustrated in FIG. 16(a) to the font size illustrated in FIG. 16 b).

In practical applications, the user needs to edit the lyrics severaltimes to satisfy his requirement. In the disclosure, the lyrics can beremoved from the lyric display area. A duration of a dragging operationcan be identified before the lyrics are removed.

In the disclosure, mistakenly removing the lyrics can be avoided.

In a possible implementation of embodiments of the disclosure, the abovemethod for adding lyrics to a short video can include the following, asillustrated in FIG. 17.

At 701, a dragging operation of the lyrics is monitored in the lyricdisplay area, and a removal area is displayed on the music editing pagebased on a duration of the dragging operation being greater than a firstpreset duration.

At 702, the lyrics are moved to the removal area based on a trajectoryof the dragging operation.

In embodiments of the disclosure, after the dragging operation of thelyrics is monitored in the lyric display area, the duration of thedragging operation is compared with the first preset duration. When theduration of the dragging operation is greater than the first presetduration, the removal area is displayed on the music editing page andthe lyrics are controlled to move to the removal area based on thetrajectory of the dragging operation. When the duration of the draggingoperation is less than or equal to the first preset duration, thedragging operation is ignored and the lyrics are controlled to return toa position prior to the dragging operation.

As an example, after monitoring that there is the dragging operation ofthe lyrics and identifying that the duration of the dragging operationis greater than the first preset duration, as illustrated in FIG. 18,the removal area 19 is displayed on the music editing page, and thelyrics are controlled to follow the trajectory of the dragging operationto move to the removal area.

It is to be noted that after the lyrics are deleting by moving to theremoval area, the audio of the target music material is still reserved.

In embodiments of the disclosure, when the user is not satisfied withthe currently selected target music material and tries to reselectanother target music material, the user can trigger an entry control anda first display page is displayed for reselecting the target musicmaterial. The entry control is set on the music editing page.

For example, as illustrated in FIG. 19, the “Change music” on the musicediting page is the entry control 40. In response to a triggeringoperation on the entry control 40 of “Change music”, the music editingpage 2 jumps to the first display page 1.

In the disclosure, the interaction scheme is simplified.

After the source short video is obtained, the first display page can bedirectly called, and the target operation can be monitored on the firstdisplay page. After monitoring that there is the target operation, thefirst display page is switched directly to the music editing page, toedit the target music material to obtain the target short video.

In the disclosure, the number of interactions is reduced, the operationtime is shortened, and the cost of learning is reduced, which improvesthe user experience.

Further, in the disclosure, the color tuning area, the word effect area,the audio display area, and lyric display area are all displayed on themusic editing page.

After jumping to the music editing page, the user can intuitively editthe target music material, making the user operation smooth andconvenient, reducing the cost of learning for users and improving theuser experience.

FIG. 20 is a flowchart illustrating a method for adding lyrics to ashort video according to embodiments of the disclosure. As illustratedin FIG. 20, the method for adding lyrics to a short video according toembodiments can include the following.

At 801, a first display page including at least one music material iscalled.

For example, the stored video can be retrieved from a local videolibrary, a remote video library, an image library, both the local videolibrary and the remote video library, both the local video library andthe image library, both the remote video library and the image library,or all of the local video library and the remote video library and theimage library. In an example, after a local video is retrieved, thefirst display page can be called. In another example, the video can bedirectly recorded and the first display page is called after recordingthe video.

It is to be noted that after the video is obtained in the above manner,it can be determined whether the obtained video meets a processingcondition. When the duration of the video is less than or equal to thepreset duration, the processing condition is met and the first displaypage can be called. When the duration of the video is greater than thepreset duration, the processing condition is not met, the video is cutto obtain a video clip such that the duration of the video clip is lessthan or equal to the preset duration, and the first display page iscalled. The preset duration can be set based on actual situations. Forexample, the preset duration is 5 minutes or 60 seconds.

In embodiments of the disclosure, the short video can be obtained, andthe first display page is called after the short video is obtained. Forexample, the first display page can be called by clicking a “Next”button or by clicking a “recording” button after a previous recording isfinished. The first display page includes at least one music material.

For example, after a source short video is obtained, the first displaypage 1 illustrated as FIG. 21 can be called. The first display pageincludes multiple music materials 14, a searching box 15, relatedcontrols 11 and 12, a display box 16 of song information, and a displaybox 17 of a song cover.

At 802, a target operation of the candidate music material is monitored,and a calling instruction for calling the music editing page isgenerated based on the target operation. In embodiments of thedisclosure, the target operation can be set for the first display pagein advance, and the calling instruction for calling the music editingpage can be generated through the target operation. As an example, acontrol A on the first display page can be configured in advance, and acertain operation of the control A can be defined as the targetoperation. As another example, a certain user operation on the firstdisplay page can be configured and defined as the target operation.

For example, the user can perform various operations on the firstdisplay page. In embodiments of the disclosure, it can be identifiedwhether the user operation is the target operation. When it is monitoredthat a control on which the user operation is performed is the control Aand the user operation is a certain operation (such as a clickingoperation on the control A), it means that the user operation is thetarget operation. Therefore, the calling instruction for calling themusic editing page is generated based on the target operation.

At 803, the first display page jumps to the music editing page based onthe calling instruction, and the music material is loaded to the musicediting page.

The calling instruction refers to an instruction for calling the musicediting page. In some examples, for calling the music editing page, thecalling instruction carries an identifier of the music editing page, andthe music editing page is called by calling a function to enable theprogram to execute a code segment of the music editing page.

As another possible implementation, for calling the music editing page,the position of the target operation can be obtained, and the targetmaterial can be determined and cached based on the position of thetarget operation. The music editing page can be called by reading thecache.

It is to be noted that, for loading the target music material to themusic editing page, the aforementioned calling instruction also carriesan identifier of the target music material, to obtain the data of thetarget music material and load the data of the target music material tothe music editing page. For example, the target music materialcorresponding to the staying position can be determined based on thestaying position of the target operation and a correspondence betweenthe staying positions and the page elements. The identifier of thetarget music material is carried in the calling instruction. The targetmusic material can be a locally cached music material, or a musicmaterial pulled from the background.

For example, after monitoring that there is a target operation performedon the music material “Song 1”, a calling instruction for calling themusic editing page 2 can be automatically generated. In this case, thefirst display page 1 is switched to the music editing page 2 illustratedas FIG. 22 based on the calling instruction, and the music material“Song 1” is loaded into the music editing page 2.

Further, after switching to the music editing page, the user can editthe target music material on the music editing interface. The musicmaterial generally includes lyrics and audio, such that the audio andthe lyrics can be edited separately. For example, the word effect andthe color of the lyrics, or length of the audio can be edited. Further,to enable the edited target music material to be displayed in the shortvideo, the edited target music material may be loaded into the sourceshort video to obtain the target short video.

In a process of loading the edited target music material to the sourceshort video, the image frames, the lyrics, the playback time of theaudio and other related data of the target music material need to besynchronized with each other, such that in the target short video, theedited target music material is displayed synchronously with the sourceshort video.

For example, as illustrated in FIG. 23, in response to the editingoperation of the user on the lyrics of the target music material “—Song1”, the edited music material is obtained, and the edited music materialis loaded into the source short video to generate the target shortvideo. FIG. 23 is a schematic diagram illustrating a playback page ofthe target short video, where the user edits the word effect, the color,and the staying position of the lyrics.

In the disclosure, the interaction scheme is simplified.

The first display page is directly called and the target operation onthe first display page is monitored after the source short video isobtained. The first display page is directly switched to the musicediting page to edit the target music material after it is monitoredthat there is the target operation.

In the disclosure, the number of interactions is reduced, the operationtime is shortened, the cost of learning is reduced, and the userexperience is improved.

In embodiments of the disclosure, since various controls such asselection controls and playback controls, and at least one musicmaterial are provided on the first display page, different settings ofthe target operation can be set in advance allow the user to generatethe calling instruction for calling the music editing page in one ormore ways.

As a possible implementation, the target operation can be set as aclicking operation on an arranging position of the selection control.

In some examples, the clicking operation on the arranging position ofthe selection control of the music material can be monitored. After itis monitored that there is the clicking operation on the arrangingposition of the selection control, the calling instruction is generatedbased on the clicking operation on the arranging position of theselection control.

For example, in the first display page 1 illustrated in FIG. 24, the“apply” button is the selection control 11. When it is monitoring thatthere is a clicking operation on the arranging position of the “apply”button of the music material “Song 1”, the calling instruction isgenerated based on the clicking operation on the arranging position ofthe “apply” button. It is to be noted that in practical applications,before the user selects the target music material, he may also beinterested in other music materials at the same time. Therefore, acollecting operation of music materials can be monitored in thedisclosure, and a collecting instruction is generated based on themonitored collecting operation.

In some examples, as illustrated in FIG. 24, the clicking operation onthe arranging position of a playback control 12 of the music materialcan be monitored. After it is monitored that there is the clickingoperation on the arranging position of the playback control 12, asillustrated in FIG. 25, a favorites icon 13 of the music material isdisplayed on the first display page. The displayed favorites icon of themusic material corresponds to the clicked music material one-to-one.

For example, as illustrated in FIG. 25, after monitoring that there isthe clicking operation on the arranging position of the playback control12, the favorites icon 13 of the music material can be displayed behindthe music material “Song 1” on the first display page 1.

As another possible implementation, the target operation can be set as aclicking operation on the arranging position of the playback control 12.

The arranging position of the playback control can be set based onactual situations. As an example, as illustrated in FIG. 21, theplayback control can be arranged in a display box of the song cover. Asanother example, the playback control can be arranged in the display boxof the song information.

In the disclosure, the occupied area of the playback control on thefirst display page is saved, and the first display page is concise andclear. In addition, the learning cost of the user can be reduced, andthe user experience can be improved.

In some examples, the clicking operation on the arranging position ofthe playback control 12 of the music material can be monitored. After itis monitored that there is the clicking operation on the arrangingposition of the playback control 12, a calling instruction is generatedbased on the clicking operation on the arranging position of theplayback control 12.

For example, in the first display page 1 illustrated in FIG. 21, thedisplay box of the song cover is the playback control 12. When it ismonitored that there is the clicking operation on the arranging positionin the display box of the song cover, the calling instruction isgenerated based on the clicking instruction on the arranging position inthe display box of the song cover.

As another possible implementation, the target operation can be set as adouble-clicking operation, a long-pressing operation, or a slidingoperation on the music material.

In some examples, the double-clicking operation, the long-pressingoperation and the sliding operation on the music material can bemonitored. After monitoring that there is the double-clicking operation,the long-pressing operation, or the sliding operation, a callinginstruction is generated based on the double-clicking operation, thelong-pressing operation or the sliding operation.

For example, in the first display page 1 illustrated in FIG. 21, thedouble-clicking operation, the long-pressing operation or the slidingoperation in the display box 16 of the song information can bemonitored. When it is monitored that there is the double-clickingoperation, the long-pressing operation or the sliding operation, thecalling instruction is generated based on the double-clicking operation,the long-pressing operation or the sliding operation.

With the method for processing a short video according to embodiments ofthe disclosure, setting different target operations in advance can allowthe user to generate a calling instruction for calling the music editingpage in one or more ways.

FIG. 26 is a flowchart illustrating a method for adding lyrics to ashort video according to embodiments of the disclosure. As illustratedin FIG. 26, the method for adding lyrics to a short video according tothe disclosure includes the following.

At 901, a first display page including at least one music material iscalled.

At 902, a target operation on a candidate music material is monitored,and a calling instruction for calling a music editing page is generatedbased on the target operation when monitoring that there is the targetoperation.

At 903, the clicking operation on the playback control of the musicmaterial is monitored. The favorites icon of the music material isdisplayed on the first display page based on the clicking operation ofthe playback control when monitoring that there is the clickingoperation.

It is to be noted that introduction of blocks 901 to 903 can be seenthose of blocks 801 and 802, which are not repeated here.

At 904, the first display page is switched to the music editing pagebased on the calling instruction, and the target music material isloaded on the music editing page.

In embodiments of the disclosure, as illustrated in FIG. 27, the processfrom obtaining the source short video to switching to the music editingpage is as follows. As illustrated in FIG. 27(a), after obtaining thesource short video, the first display page 1 is called. As illustratedin FIG. 27(b), it is monitored that there is the clicking operation ofthe user on the arranging position of the playback control 12 on thefirst display page 1. As illustrated in FIG. 27(c), the favorites icon13 is displayed on the first display page 1 based on the clickingoperation on the playback control 12. As illustrated in FIG. 27(d), itis monitored that there is a clicking operation of the user on thearranging position of the selection control 11 on the first display page1. As illustrated in FIG. 27(e), the calling instruction is generatedbased on the clicking operation on the selection control 11. The firstdisplay page 1 is switched to the music editing page 2 based on thecalling instruction. Therefore, after switching to the music editingpage, the target music material can be loaded on the music editing page.

In embodiments of the disclosure, the user can perform various editingoperations such as color toning, cutting, and word effect modifying onthe target music on the music editing page. Therefore, in thedisclosure, the target music material can be edited in response to anediting operation on the target music material on the music editingpage.

In embodiments of the disclosure, as illustrated in FIG. 28, the musicediting page 2 includes: a color tuning area 21, a word effect area 22,an audio display area 23 and a lyric display area 24. The placementpositions of the aforementioned areas can be adjusted based on actualsituations. For example, as illustrated in FIG. 28, the color tuningarea 21 is placed at the upper right of the music editing page, thelyric display area 24 is placed at the middle of the music editing page,the audio display area 23 is placed below the lyric display area, andthe word effect area 22 is placed below the audio display area.

In embodiments of the disclosure, the color tuning area, the word effectarea, the audio display area and the lyric display area are alldisplayed on the music editing page.

In the disclosure, the interaction scheme is optimized, and the user canfeel the simple and smooth operation while editing the target musicmaterial intuitively. In addition, the learning cost is reduced for theuser, the music editing page is concise and clear, and the user edit thetarget music material efficiently.

As a possible implementation, with the method for adding lyrics to ashort video according to embodiments of the disclosure, the audio andthe lyrics of the target music material are added to the music editingpage after switching to the music editing page, which includes thefollowing, as illustrated in FIG. 29.

At 1001, the audio and the lyrics of the target music material areobtained.

In embodiments of the disclosure, after jumping to the music editingpage, the target music material can be loaded into the music editingpage. The audio and the lyrics of the target music material are obtainedseparately based on the loaded target music. The audio is added to theaudio display area, and the lyrics are loaded to the lyric display area.

In some examples, for acquiring the audio and the lyrics, an obtaininginstruction can be automatically generated, and the delivered audio andlyrics can be received. The audio and the lyrics can be obtained from alocal server or a remote server.

At 1002, the audio is loaded into the audio display area and displayed.

For example, after the audio is obtained, the audio can be loaded intothe audio display area and displayed. For loading the audio, theposition of the audio display area can be determined, and the audio isfilled in the location of the audio display area.

It is to be noted that when the audio of the target music material isobtained, for displaying the audio in the audio display area, a displaymanner can be set based on actual situations. For example, the audio ofthe target music material can be dynamically displayed in a form ofdynamic sound waves.

At 1003, the lyrics are loaded into the lyric display area anddisplayed.

For example, after the lyrics are obtained, the lyrics can be loadedinto the lyric display area and displayed. For loading the lyrics, theposition of the lyric display area is determined, and the lyrics arefilled into the position of the lyric display area.

In a possible implementation of the disclosure, before calling the firstdisplay page, a second display page can be called to select an effectelement and the effect element is loaded into the short video.

In the disclosure, different needs of the user for processing the shortvideo can be met.

FIG. 30 is a flowchart illustrating a method for adding lyrics to ashort video according to embodiments of the disclosure. As illustratedin FIG. 30, the method for adding lyrics to a short video according tothe disclosure includes the following.

At 1101, a second display page including an effect element is called.The effect element includes at least a music effect element.

The second display page can include multiple effect elements. The effectelements include at least the music effect element. For example, afterthe source short video is obtained, the second display page 3 asillustrated in FIG. 31 can be called.

At 1102, the first display interface is called in response to aselecting instruction on the music effect element on the second displaypage.

For example, after the user selects a corresponding music effect elementby clicking, double-clicking, long-pressing, or sliding operation, theselecting instruction on the music effect element on the second displaypage can be responded to. After responding to the selecting instruction,the first display page is automatically switched to.

It is to be noted that at a first startup, a second reminder message canbe displayed on a video shooting page for a second preset duration. Thesecond reminder message is displayed at a calling control of the seconddisplay page. The second reminder message is configured to indicate thata music effect element is included on the second display page. Thepreset duration can be set based on actual conditions. For example, thesecond preset duration can be set to 5 seconds.

For example, as illustrated in FIG. 32(a), at the first startup, afterthe source short video is obtained, the second reminder message “Tryadding lyrics” can be displayed at the effect icon 50 on the videoshooting page for 5 seconds. Further, as illustrated in FIG. 32(b), inresponse to the selecting instruction on the music effect element on thesecond display page 3, the first display page 1 illustrated as FIG.32(c) is switched to.

It is to be noted that in addition to the second reminder message, thefollowing reminder messages may also be displayed on the video shootingpage, such as a third reminder message, a fourth reminder message, and afifth reminder message. The third reminder message is configured toindicate that a cover effect element is included on the second displaypage. The fourth reminder message is configured to indicate that abackground effect element is included on the second display page. Thefifth reminder message is configured to indicate hot/new songsrecommendation.

Only one type of reminder message may be displayed on a page at the sametime. That is, the reminder messages may be displayed on the videoshooting page in a preset order. For example, the order can be: thesecond reminder message, the third reminder message, the fourth remindermessage, and then the fifth reminder message.

At 1103, the target operation on the music material is monitored, and acalling instruction for calling the music editing page is generatedbased on the target operation.

At 1104, the first display page is switched to the music editing pagebased on the calling instruction, and the target music material isloaded to the music editing page. The target music material is a musicmaterial required by the source short video.

At 1105, the target music material is edited and loaded to the sourceshort video to generate the target short video in response to an editingoperation on the target music material on the music editing interface.

It is to be noted that, the descriptions of blocks 1103 to 1105 can beseen from those of blocks 902 to 904, which are not repeated here.

With the method for adding lyrics to a short video according toembodiments of the disclosure, the effect element is selected by callingthe second display page including the effect elements. The first displaypage is called in response to the selecting instruction on the musiceffect element on the second display page. After the editing of theeffect element, the first display page is switched to. After it ismonitored that there is the target operation, the first display page isswitched to the music editing page to edit the target music material toobtain the target short video.

In the disclosure, the number of interactions is reduced, the operationtime is shortened, various needs of the user for processing the shortvideo is met, and the user experience is improved.

Further, in the disclosure, the color tuning area, the word effect area,the audio display area, and the lyric display area are all displayed onthe music editing page.

In the disclosure, after switching to the music editing page, the usercan intuitively perform the target music material, which makes useroperations smooth and convenient, reduces the learning cost for the userand improves the user experience.

FIGS. 33-40 are block diagrams illustrating a device for adding lyricsto a short video according to embodiments of the disclosure.

As illustrated in FIG. 33, the device 1000 includes a material obtainingmodule 121, a duration obtaining module 122, and a lyric extractingmodule 123.

The material obtaining module 121 is configured to obtain a musicmaterial required by a short video.

The duration obtaining module 122 is configured to generate a targetmusic material corresponding to the short video based on a firstplayback duration, where the playback duration of the target musicmaterial matches the first playback duration.

The lyric extracting module 123 is configured to generate a lyricsticker corresponding to the target music material based on lyricsextracted from the target music material and display the short videoadded with the lyric sticker.

In some embodiments of the disclosure, as illustrated in FIG. 34, theduration obtaining module 122 includes: an obtaining unit 1221, adetermining unit 1222, a compensating unit 1223, and a first cuttingunit 1224. The obtaining unit 1221 is configured to obtain a secondplayback duration of the music material. The determining unit 1222 isconfigured to determine whether the first playback duration is greaterthan the second playback duration. The compensating unit 1223 isconfigured to generate the target music material by compensating theplayback duration of the music material to the first playback durationwhen the first playback duration is greater than the second playbackduration. The first cutting unit 1224 is configured to generate thetarget music material by cutting the music material when the firstplayback duration is less than the second playback duration.

In some embodiments of the disclosure, the compensating unit 1223illustrated in FIG. 34 is configured to obtain a duration differencebetween the first playback duration and the second playback duration,and compensate the second playback duration to the first playbackduration by playing the music material in a loop based on the durationdifference.

In some embodiments of the disclosure, as illustrated in FIG. 34, theduration obtaining module 122 further includes a position determiningunit 1225 and a second cutting unit 1226. The position determining unit1225 is configured to determine a cutting position of the music materialbased on a cutting operation of the music material when the firstplayback duration is less than the second playback duration. The secondcutting unit 1226 is configured to generate the target music material bycutting the music material at the cutting position.

In some embodiments of the disclosure, as illustrated in FIG. 34, theduration obtaining module 122 further includes a reminding unit 1227.The reminding unit 1227 is configured to generate and display a firstreminder message indicating that the cutting operation of the musicmaterial fails when the first playback duration is greater than thesecond playback duration.

In some embodiments of the disclosure, as illustrated in FIG. 35, thelyric extracting module 123 includes a sound wave displaying unit 1231.The sound wave displaying unit 1231 is configured to identify a segmentwithout lyrics from the target music material, determine a dynamiceffect of sound waves corresponding to the segment without lyrics basedon an amplitude of the audio, and display the sound waves with thedynamic effect.

In some embodiments of the disclosure, the lyric extracting module 123illustrated in FIG. 35 is further configured to extract the lyrics fromthe target music material, generate a playback timeline for the lyricsticker based on the playback time of the target music material,synchronize the playback timeline of the lyric sticker and the playbacktimeline of the short video, and synchronously update the lyricscurrently required by the lyric sticker based on a current playbackprogress of the short video.

In some embodiments of the disclosure, as illustrated in FIG. 36, thedevice 1000 further includes a first responding module 124, a positionobtaining module 125, a color obtaining module 126, and a color editingmodule 127. The first responding module 124 is configured to respond toa color editing operation of the lyrics after generating the lyricsticker corresponding to the target music material and displaying theshort video added with the lyric sticker. The position obtaining module125 is configured to obtain a staying position of the color editingoperation in a color tuning area. The color obtaining module 126 isconfigured to obtain a target color to be used for the lyrics of thetarget music material based on the staying position. The color editingmodule 127 is configured to edit a current color of the lyrics to thetarget color.

In some embodiments of the disclosure, as illustrated in FIG. 37, thecolor editing module 127 includes a first time obtaining unit 1271 and acolor editing unit 1272. The first time obtaining unit 1271 isconfigured to obtain a current playback time of the target musicmaterial. The color editing unit 1272 is configured edit the currentcolor of the lyrics to the target color starting from the currentplayback time.

In some embodiments of the disclosure, as illustrated in FIG. 36, thedevice 1000 further includes a color displaying module 128. The colordisplaying module 128 is configured to display a floating windowcarrying the target color at the staying position after obtaining thetarget color to be used for the lyrics of the target music materialbased on the staying position. The floating window is configured toenlarge an area of the target color and display the enlarged targetcolor.

In some embodiments of the disclosure, the color tuning area isconfigured to display each candidate color. The color tuning areaincludes an outer frame and a filled area. The filled area includesmultiple sub-areas, and each sub-area corresponds to a respectivecandidate color. The filled region is filled with a color determinedbased on a correspondence between sub-areas and candidate colors.

In some embodiments of the disclosure, as illustrated in FIG. 36, thedevice 1000 further includes: a second responding module 129, a wordeffect determining module 130, and a word effect configuring module 131.The second responding module 129 is configured to respond to a wordeffect selection operation after generating the lyric stickercorresponding to the target music material and displaying the shortvideo added with the lyric sticker. The word effect determining module130 is configured to determine a selected target word effect based on aposition of the word effect selection operation on the music editingpage. The word effect configuring module 131 is configured to configurean effect of the lyrics based on the target word effect and display theprocessed lyrics on the music editing page.

In some embodiments of the disclosure, as illustrated in FIG. 38, theword effect configuring module 131 includes a second time obtaining unit1311 and a word effect configuring unit 1312. The second time obtainingunit 1311 is configured to obtain a current playback time of the targetmusic material. The word effect configuring unit 1312 is configured toconfigure an effect of the lyrics based on the target word effectstarting from the current playback time.

In some embodiments of the disclosure, as illustrated in FIG. 36, thedevice 1000 further includes a third responding module 132 and a fontscaling module 133. The third responding module 132 is configured torespond to a lyric scaling operation of the lyrics after generating thelyric sticker corresponding to the target music material and displayingthe short video added with the lyric sticker. The font scaling module133 is configured to scale a font size of the lyrics based on thescaling operation.

In some embodiments of the disclosure, as illustrated in FIG. 39, thematerial obtaining module 121 further includes a calling unit 1211, aninstruction generating unit 1212, and a page switching unit 1213. Thecalling unit 1211 is configured to call a first display page includingat least one candidate music material. The instruction generating unit1212 is configured to monitor the target operation on the candidatemusic material, and generate a calling instruction for calling the musicediting page based on the target operation when monitoring that there isthe target operation. The page switching unit 1213 is configured toswitch the first display page to the music editing page based on thecalling instruction and load the music material to the music editingpage.

In some embodiments of the disclosure, as illustrated in FIG. 40, theinstruction generating unit 1212 includes a first monitoring subunit12121 and a first instruction generating subunit 12122. The firstmonitoring subunit 12121 is configured to monitor a clicking operationon a selection control of the music material. The first instructiongenerating subunit 12122 is configured to generate the callinginstruction based on the clicking operation on the selection controlwhen monitoring that there is the clicking operation on the selectioncontrol.

In some embodiments of the disclosure, as illustrated in FIG. 40, theinstruction generating unit 1212 further includes a second monitoringsubunit 12123 and an icon displaying subunit 12124. The instructiongenerating subunit 12123 is configured to monitor the clicking operationon the playback control of the music material. The icon displayingsubunit 12124 is configured to display a favorites icon of the musicmaterial on the first display page when it is monitored that there isthe clicking operation of the playback control.

In some embodiments of the disclosure, as illustrated in FIG. 40, theinstruction generating unit 1212 further includes a third monitoringsubunit 12125 and a second instruction generating subunit 12126. Thethird monitoring subunit 12125 is configured to monitor a clickingoperation on the playback control of the music material. The secondinstruction generating subunit 12126 is configured to generate thecalling instruction based on the clicking operation on the playbackcontrol when it is monitored that there is the clicking operation on theplayback control.

In some embodiments of the disclosure, as illustrated in FIG. 40, theinstruction generating unit 1212 further includes a fourth monitoringsubunit 12127 and a third instruction generating subunit 12128. Thefourth monitoring subunit 12127 is configured to monitor adouble-clicking operation, a long-pressing operation, or a slidingoperation on the music material. The third instruction generatingsubunit 12128 is configured to generate the calling instruction based onthe double-clicking operation, the long-pressing operation or thesliding operation, when it is monitored that there is thedouble-clicking operation, the long-pressing operation or the slidingoperation.

Regarding the device in the foregoing embodiments, the specific mannerin which each module performs operation has been described in detail inembodiments of the method, and detailed description will not be givenhere.

In some embodiments of the disclosure, after the music material to beused by the short video and the first playback duration of the shortvideo are obtained, the target music material having the playbackduration matching the first playback duration is generated. The lyricsare extracted to generate the lyric sticker, and the lyric sticker isadded to the short video. The lyric sticker is dynamically displayed inthe short video as the target music material.

In the disclosure, the interaction solution is simplified, the number ofinteractions is reduced, the operation time is shortened, the learningcost is reduced, and the user experience is improved.

To implement the above embodiments, the disclosure further provides anelectronic device. As illustrated in FIG. 41, the electronic device 8000includes a processor 801 and one or more memories 802 for storingexecutable instructions executable by the processor 801. The processor801 is configured to execute a method for adding lyrics to a short videoas described in the foregoing embodiments. The processor 801 and thememory 802 are connected through a communication bus.

In order to implement the above-mentioned embodiments, the disclosurefurther provides a storage medium including instructions, for example,the memory 802 including instructions. The above-mentioned instructionscan be executed by a processor 801 of a device 1000 to execute theabove-mentioned method. For example, the storage medium may be anon-transitory computer-readable storage medium. For example, thenon-transitory computer-readable storage medium may be ROM, randomaccess memory (RAM), CD-ROM, magnetic tape, floppy disk, and opticaldata storage device.

Other embodiments of the disclosure will be apparent to those skilled inthe art after considering the description and practicing the disclosuredisclosed herein. The disclosure is intended to cover any variations,uses or adaptive changes of the disclosure. These variations, uses oradaptive changes are in accordance with general principles of thedisclosure and include common knowledge or technical means in the artthat are not disclosed herein. The description and embodiments are to beregarded as illustrative only, and the real scope and spirit of thedisclosure are pointed out in the attached claims.

It should be understood that the disclosure is not limited to theprecise structures described above and illustrated in the drawings, andvarious modifications and changes may be made without departing from thescope thereof The scope of the disclosure is merely limited by theattached claims.

What is claimed is:
 1. A method for adding lyrics to a short video,comprising: obtaining a first playback duration of a short video;generating a target music material corresponding to the short videobased on the first playback duration, wherein a playback duration of thetarget music material matches the first playback duration; andgenerating a lyric sticker corresponding to the target music materialbased on lyrics extracted from the target music material, and displayingthe short video added with the lyric sticker.
 2. The method of claim 1,wherein said generating the target music material comprises: obtaining amusic material and a second playback duration of the music material;generating the target music material by compensating the second playbackduration to the first playback duration in response to the firstplayback duration being greater than the second playback duration; andgenerating the target music material by cutting the music material inresponse to the first playback duration being less than the secondplayback duration.
 3. The method of claim 2, wherein said compensatingthe second playback duration comprises: obtaining a duration differencebetween the first playback duration and the second playback duration,and compensating the second playback duration to the first playbackduration by playing the music material in a loop based on the durationdifference.
 4. The method of claim 2, wherein said cutting the musicmaterial comprises: determining a cutting position of the music materialbased on a cutting operation on the music material; and cutting themusic material at the cutting position.
 5. The method of claim 1,further comprising: identifying a segment without lyrics from the targetmusic material; determining a dynamic effect for sound wavescorresponding to the segment without lyrics based on an amplitude of anaudio; and displaying the sound waves with the dynamic effect.
 6. Themethod of claim 1, wherein said generating the lyric sticker comprises:generating a playback timeline for the lyric sticker based on a playbacktime of the target music material; synchronizing the playback timelineof the lyric sticker with a playback timeline of the short video, andsynchronously updating the lyrics of the lyric sticker based on aplayback progress of the short video.
 7. The method of claim 1, furthercomprising: obtaining a staying position of a color editing operation ofthe lyrics in a color tuning area; obtaining a target color for thelyrics of the target music material based on the staying position; andediting the lyrics to the target color.
 8. The method of claim 7,further comprising: displaying a floating window at the stayingposition, wherein the floating window is configured to display andenlarge an area of the target color.
 9. The method of claim 1, furthercomprising: determining a target word effect based on a position of aword effect selection operation on a music editing page; and displayingthe lyrics configured with the target word effect.
 10. The method ofclaim 1, further comprising: scaling a font size of the lyrics based ona lyric scaling operation.
 11. The method of claim 2, wherein saidobtaining the music material comprises: calling a first display pageincluding at least one candidate music material; generating a callinginstruction for calling a music editing page based on a target operationon the candidate music material; and switching the first display page tothe music editing page based on the calling instruction, and loading thecandidate music material to the music editing page as the musicmaterial.
 12. The method of claim 11, wherein said generating thecalling instruction comprises: generating the calling instruction inresponse to a clicking operation on a selection control of the musicmaterial or on a playing control of the music material on the firstdisplay page; or generating the calling instruction in response to adouble-clicking operation, a long-pressing operation, or the slidingoperation.
 13. The method of claim 11, wherein the method furthercomprises: displaying a favorites icon of the music material on thefirst display page in response to a clicking operation on a playingcontrol of the music material on the first display page.
 14. Anelectronic device, comprising: a processor; and a memory, configured tostore instructions executable by the processor; wherein in response tothe instructions are executed by the processor, the processor isconfigured to: obtain a first playback duration of a short video;generate a target music material corresponding to the short video basedon the first playback duration, wherein a playback duration of thetarget music material matches the first playback duration; and generatea lyric sticker corresponding to the target music material based onlyrics extracted from the target music material, and display the shortvideo added with the lyric sticker.
 15. The electronic device of claim14, wherein the processor is further configured to: obtain a musicmaterial and a second playback duration of the music material; generatethe target music material by compensating the second playback durationto the first playback duration in response to the first playbackduration being greater than the second playback duration; and generatethe target music material by cutting the music material in response tothe first playback duration being less than the second playbackduration.
 16. The electronic device of claim 15, wherein the processoris further configured to: obtain a duration difference between the firstplayback duration and the second playback duration, and compensate thesecond playback duration to the first playback duration by playing themusic material in a loop based on the duration difference.
 17. Theelectronic device of claim 15, wherein the processor is furtherconfigured to: determine a cutting position of the music material basedon a cutting operation on the music material; and cut the music materialat the cutting position.
 18. The electronic device of claim 14, whereinthe processor is further configured to: identify a segment withoutlyrics from the target music material; determine a dynamic effect forsound waves corresponding to the segment without lyrics based on anamplitude of an audio; and display the sound waves with the dynamiceffect.
 19. The electronic device of claim 14, wherein the processor isfurther configured to: generate a playback timeline for the lyricsticker based on a playback time of the target music material;synchronize the playback timeline of the lyric sticker with a playbacktimeline of the short video, and synchronously update the lyrics of thelyric sticker based on a playback progress of the short video.
 20. Anon-transitory computer readable storage medium, configured to storeinstructions, in response to the instructions being executed by one ormore processors, the one or more processors are caused to perform stepscomprising: obtaining a first playback duration of a short video;generating a target music material corresponding to the short videobased on the first playback duration, wherein a playback duration of thetarget music material matches the first playback duration; andgenerating a lyric sticker corresponding to the target music materialbased on lyrics extracted from the target music material, and displayingthe short video added with the lyric sticker.